package com.example.controller;

import com.example.pojo.Announce;
import com.example.service.AnnounceService;
import com.example.service.impl.AnnounceServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class AnnounceController {
    @Resource(name = "announceService")
    public AnnounceService announceService;
    @RequestMapping("/announcelist")
    @ResponseBody
    public List<Announce> getAnnounceList() {
        return announceService.getAnnounceList();
    }
}
